package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.

import (
	"context"
	"gqlt2/graph/model"

	"github.com/dgryski/trifles/uuid"
)

func (r *queryResolver) VehicleLocationLastList(ctx context.Context, query model.VehicleLocationLastListQuery) ([]*model.VehicleLocationLast, error) {
	f := 2.0
	return []*model.VehicleLocationLast{
		&model.VehicleLocationLast{
			Vehicle:             &model.Vehicle{VehicleID: uuid.UUIDv4()},
			GpsSpeed:            &f,
			SpeedLimitThreshold: &f,
		},
	}, nil
}

func (r *queryResolver) VehicleLocationLast(ctx context.Context, query model.VehicleLocationLastQuery) (*model.VehicleLocationLast, error) {
	f := 2.0
	return &model.VehicleLocationLast{
		Vehicle:             &model.Vehicle{VehicleID: uuid.UUIDv4()},
		GpsSpeed:            &f,
		SpeedLimitThreshold: &f,
	}, nil
}

func (r *queryResolver) VechileLocationLastSearch(ctx context.Context, query model.VechileLocationLastSearchQuery) ([]*model.VehicleLocationLast, error) {
	f := 2.0
	return []*model.VehicleLocationLast{
		&model.VehicleLocationLast{
			Vehicle:             &model.Vehicle{VehicleID: uuid.UUIDv4()},
			GpsSpeed:            &f,
			SpeedLimitThreshold: &f,
		},
	}, nil
}

func (r *queryResolver) VehicleLocationHisList(ctx context.Context, query model.VehicleLocationHisListQuery) ([]*model.VehicleLocationHis, error) {
	f := 2.0
	return []*model.VehicleLocationHis{
		&model.VehicleLocationHis{
			Vehicle:             &model.Vehicle{VehicleID: uuid.UUIDv4()},
			GpsSpeed:            &f,
			SpeedLimitThreshold: &f,
		},
	}, nil
}
